package com.eascs.ticket.ticket.format;

import java.text.FieldPosition;
import java.text.Format;
import java.text.ParsePosition;

import com.eascs.common.util.StringEscapeUtil;

public class TitleViewFormat extends Format {
	private static final long serialVersionUID = 5836697793371525024L;

	@Override
	public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
		String title = (String) obj;
		toAppendTo.append("<span style=\" word-break: break-all;word-wrap: break-word;white-space: normal;\">").append(StringEscapeUtil.escapeHtml4(title)).append("</span>");
		return toAppendTo;
	}

	@Override
	public Object parseObject(String source, ParsePosition pos) {
		return null;
	}

}
